{include header}
<div class="wrapper">
    {include header_menu}

    {include left_menu}
    <div class="main-container">

    <style>

    .table-striped>tbody>tr{
            cursor: pointer;
    }
    </style>
        <div class="padding-md">
           <form method="get">
            <input type="hidden" name="s" value="admin{#EXP}thread">
              <div class="form-group">
                  <label>筛选分类</label>
                   <select class="form-control" name="forum">
                        <option value="-1">选择分类下的主题</option>
                        {foreach $forum as $v}
                        <option value="{$v.id}" {if isset($sforum)}{if $sforum == $v['id']}selected = "selected" {/if}{/if}>{$v.name}</option>
                        {/foreach}
                    </select>
                  
              </div>
              <div class="form-group">
                  
                  <button type="submit" class="btn btn-success btn-sm">筛选</button>
                  
              </div>
              
                  
              
          
          </form>

          <div class="row">
                <div class="col-md-3">
                    <div class="widget-stat clearfix">
                        <span class="stat-icon bg-info bounceIn animation-delay3"><i class="fa fa-comment"></i></span>
                        <div class="stat-info">
                            <small class="text-muted text-upper">主题数量</small>
                            <span>{$count.thread}</span>
                        </div>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="widget-stat clearfix">
                        <span class="stat-icon bg-success bounceIn animation-delay3"><i class="fa fa-comments"></i></span>
                        <div class="stat-info">
                            <small class="text-muted text-upper">评论数量</small>
                            <span>{$count.post}</span>
                        </div>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="widget-stat clearfix">
                        <span class="stat-icon bg-danger bounceIn animation-delay3"><i class="fa fa-comment-o"></i></span>
                        <div class="stat-info">
                            <small class="text-muted text-upper">今日发表主题</small>
                            <span>{$count.day_thread}</span>
                        </div>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="widget-stat clearfix">
                        <span class="stat-icon bg-warning bounceIn animation-delay3"><i class="fa fa-comments-o"></i></span>
                        <div class="stat-info">
                            <small class="text-muted text-upper">今日发表评论</small>
                            <span>{$count.day_post}</span>
                        </div>
                    </div>
                </div>
            </div>
            <form action="" method="post">
            <input type="hidden" name="gn" value="del">
            <div class="table-responsive">
            
            <table class="table table-striped table-bordered m-top-md" id="dataTable">
    			<thead>
        			<tr class="bg-dark-blue">
                        <th>
                            <div class="custom-checkbox">
                              <input type="checkbox" id="chkx" onclick="if($(this).is(':checked'))$('.checkboxx').prop('checked','checked'); else $('.checkboxx').attr('checked',false);">
                              <label for="chkx"></label>
                            </div>
                        </th>
        				<th>文章ID</th>
        				<th>分类&FID</th>
        				<th>作者&UID</th>
                        <th>标题</th>
                        <th>发表时间</th>
                        <th>浏览次数</th>
                        <th>评论数量</th>
                        <th>顶</th>
                        <th>踩</th>
                        <th>置顶</th>
                        <th>操作</th>
        			</tr>
    				</thead>
    				<tbody>
              {foreach $data as $v}
              <tr>
                  <td>
                    <div class="custom-checkbox">
                      <input name="id[]" value="{$v.tid}" class="checkboxx" type="checkbox" id="chk{$v.tid}">
                      <label for="chk{$v.tid}"></label>
                    </div>
                  </td>
                  <td>{$v.tid}</td>
                  <td><?php echo forum($forum,$v['fid'],'name'); ?><small class="badge badge-success badge-square bounceIn animation-delay2 m-left-xs pull-right">{$v.fid}</small></td>
                  <td>{$v.user}<small class="badge badge-success badge-square bounceIn animation-delay2 m-left-xs pull-right">{$v.uid}</small></td>
                  <td>{$v.title}</td>
                  <td><?php echo date("Y-m-d H:i:s",$v['atime']); ?></td>
                  <td>{$v.views}</td>
                  <td>{$v.posts}</td>
                  <td>{$v.goods}</td>
                  <td>{$v.nos}</td>
                  <td>{if $v['top']==1}<span class="label label-success">板块置顶</span>{elseif $v['top']==2}<span class="label label-info">全站置顶</span>{else}无{/if}</td>
                  <td>
                      <a target="_blank" href="{if $v['pid']==0}{php HYBBS_URL('thread',$v['tid']);}{else}{php HYBBS_URL('post','edit',['id'=>$v['pid']]);}{/if}" class="btn btn-success btn-xs" >修改</a>
                      <a target="_blank" href="{php HYBBS_URL('thread',$v['tid']);}" class="btn btn-danger btn-xs">查看</a>
                  </td>
              </tr>
              {/foreach}
    				</tbody>
    			</table>
            </div>
            <div class="smart-widget-body">
                <div class="row">
                <div class="col-md-12">
                    <div class="checkbox inline-block">
                        <div class="custom-checkbox">
                            <input type="checkbox" name="del_post" id="inlineCheckbox1" class="checkbox-red" checked="">
                            <label for="inlineCheckbox1"></label>
                        </div>
                        <div class="inline-block vertical-top">
                            删除主题下所有评论
                        </div>
                    </div>
                    <div class="checkbox inline-block">
                        <div class="custom-checkbox">
                            <input type="checkbox" name="del_file" id="inlineCheckbox2" checked="">
                            <label for="inlineCheckbox2"></label>
                        </div>
                        <div class="inline-block vertical-top">
                            删除主题下所有附件
                        </div>
                    </div>
                   
                </div>
                <div class="col-md-12">
                    <button class="btn btn-danger">删除 (不可恢复)</button>
                </div>
            </div>

        </div>
        </form>
        <div class="smart-widget-body">
          <a href="{if $pageid==1}javascript:void(0);{else}?pageid={$pageid-1}{$fj}{/if}" class="btn btn-success marginTB-xs" {if $pageid==1}disabled{/if}><i class="fa fa-angle-double-left m-left-xs"></i> 上一页</a>
          <a href="{if $pageid==$page_count}javascript:void(0);{else}?pageid={$pageid+1}{$fj}{/if}" style="float:right" class="btn btn-success marginTB-xs" {if $pageid==$page_count}disabled{/if}>下一页<i class="fa fa-angle-double-right m-left-xs"></i></a>
        </div>


        
    </div>
</div>
{include footer}

